﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace 订单管理系统窗体应用
{
    public partial class ShowForm : Form
    {
        public ShowForm(List<Order> orders)
        {
            InitializeComponent();
            
            ListViewItem[] listItem = new ListViewItem[orders.Count];
            for (int i = 0; i < orders.Count; i++)
            {
                listItem[i] = new ListViewItem(
                    new string[] {orders[i].Id.ToString(), orders[i].Customer, orders[i].Date});
            }
          
            orderListView.Items.AddRange(listItem);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
